|
|
|
|
|
|
|
Figure 17.10
Program VBRay ray tracing three spheres. |
|
|
|
|
|
|
|
|
Enter commands to describe a scene in the Objects text box. The entries in the Objects menu add dummy entries to the end of the object list. You can edit dummy entries and fill in the values you want. For example, the Sphere command adds the following code to the text box. |
|
|
|
 |
|
|
|
|
Sphere( Radius, X, Y, Z,
ka_r, ka_g, ka_b, ' Ambient kd_r, kd_g, kd_b, ' Diffuse spec_n, spec_s, ' Specular kr_r, kr_g, kr_b, ' Reflected kt_n, n1, n2, ' TransN, n1, n2 kt_r, kt_g, kt_b ' Transmitted ) |
|
|
|
|
|
|
|
|
You can modify these values to set the sphere's radius, position, and color parameters. |
|
|
|
|
|
|
|
|
The File menu's Open Scene and Save Scene commands allow you to load and save object descriptions in files. Using the examples on the CD-ROM and the commands in the Objects menu, you can figure out how to create scenes of your own. |
|
|
|
|
|
|
|
|
Select the display method you want to use and click the Render button. You can use the simpler display methods to view complex scenes before you use more advanced methods. For example, you can move objects and adjust the viewing position using a wire frame display. When you are satisfied with the results, you can ray trace the final image. |
|
|
|
|
|
|
|
|
The Polygons box tells how many polygons were used when you click the Hidden Surface Removal or Surface Shading options. Figure 17.11 shows program VBRay displaying eight spheres using hidden surface removal. This example contains 360 polygons. |
|
|
|
|
|